import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
// 配置路由的数据源
let routes = [
    {
        path: '/',
        name: 'home',
        component: Home
    },
    {
        path: '/find',
        name: 'find',
        component: () => import('../views/Find.vue'),
        children: [
            {
                path: 'toplist',
                name: 'toplist',
                component: () => import('../views/TopList.vue')
            }
        ]
    }, {
        path: '/myMis',
        name: 'myMis',
        component: () => import('../views/MyMis.vue')
    },
]
//创建路由实例
const router = createRouter({
    history: createWebHashHistory(),
    routes
})

//外部调用
export default router